<?php
/**
 * Soar Framework - Lightweight and simple to use PHP Framework
 *
 * Soar is free software and is distributed WITHOUT ANY WARRANTY
 *
 * @package Soar
 * @version 1.0 $Id: soar.conf.php 2 2012-04-06 21:50:33Z shay@shayanderson.com $
 * @copyright Copyright (c) 2012 ShayAnderson.com
 * @license http://www.gnu.org/licenses/gpl.html GPL License
 * @link http://www.shayanderson.com/projects/soar-php-framework.htm
 */

/**
 * Soar Framework Configuration File
 *
 * @package Soar
 */
return array(
	/**
	 * Soar core settings
	 */
	'core' => array(
		/**
		 * Debug mode on/off (default: true)
		 *
		 * @var bool core->debug
		 */
		'debug' => true,

		/**
		 * Debugger settings
		 */
		'debugger' => array(
			/**
			 * Logging level (default: SoarDebugger::LEVEL_ALL)
			 * SoarDebugger::LEVEL_OFF = no logging
			 * SoarDebugger::LEVEL_ERROR = log error messages only
			 * SoarDebugger::LEVEL_DEBUG = log error, notice and debugging messages
			 * SoarDebugger::LEVEL_ALL = log all messages
			 *
			 * @var int core->debugger->log
			 */
			'log' => SoarDebugger::LEVEL_ALL,

			/**
			 * Log file path (default: SOAR_DIR_BASE . '_app/var/soar.log')
			 * note: ensure file has write permissions (777) if file logging is used
			 *
			 * @var string core->debugger->log_file
			 */
			'log_file' => SOAR_DIR_BASE . '_app/var/soar.log',

			/**
			 * Log file dump contents on finalize (default: true)
			 *
			 * @var bool core->debugger->log_file_dump
			 */
			'log_file_dump' => true,

			/**
			 * Log file max lines (default: 300), set to 0 (zero) for no file logging
			 * note: will only use file logging if logging level is not off
			 *
			 * @var int core->debugger->log_file_max_lines
			 */
			'log_file_max_lines' => 0
		),

		/**
		 * Environment directory settings
		 */
		'dir' => array(
			/**
			 * Application directory (default: SOAR_DIR_BASE . '_app/')
			 *
			 * @var string core->dir->app
			 */
			'app' => SOAR_DIR_BASE . '_app/',

			/**
			 * Library directory (default: SOAR_DIR_BASE . '_app/lib/')
			 *
			 * @var string core->dir->lib
			 */
			'lib' => SOAR_DIR_BASE . '_app/lib/',

			/**
			 * Module/controllers base directory (default: 'mod' => SOAR_DIR_BASE . '_app/mod/')
			 *
			 * @var string core->dir->mod
			 */
			'mod' => SOAR_DIR_BASE . '_app/mod/',

			/**
			 * Template directory (default: SOAR_DIR_BASE . '_app/tpl/')
			 *
			 * @var string core->dir->tpl
			 */
			'tpl' => SOAR_DIR_BASE . '_app/tpl/',

			/**
			 * Variable data directory (default: SOAR_DIR_BASE . '_app/var/')
			 *
			 * @var string core->dir->var
			 */
			'var' => SOAR_DIR_BASE . '_app/var/'
		),

		/**
		 *  Environment file settings
		 */
		'file' => array(
			/**
			 * Controller/PHP file extension
			 * (default: '.php')
			 *
			 * @var string core->file->ext_php
			 */
			'ext_php' => '.php',

			/**
			 * Template file extension (default: '.tpl')
			 *
			 * @var string core->file->ext_template
			 */
			'ext_template' => '.tpl'
		),

		/**
		 * Router settings
		 */
		'router' => array(
			/**
			 * Appends router action name with this name, ex: dosomething => dosomethingAction
			 * (default: 'Action')
			 *
			 * @var string core->router->action_append_name
			 */
			'action_append_name' => 'Action',

			/**
			 * Appends router controller name with this name, ex: example => ExampleController
			 * (default: 'Controller')
			 *
			 * @var string core->router->controller_append_name
			 */
			'controller_append_name' => 'Controller',

			/**
			 * Require controller, if not required view will display template file
			 * if the controller does not exist (default: false)
			 *
			 * @var bool core->router->controller_required
			 */
			'controller_require' => false,

			/**
			 * Auto display template file without having to call View display method
			 * note: turn off if not using template engine
			 *
			 * @var bool core->router->template_auto_display
			 */
			'template_auto_display' => true,

			/**
			 * Pattern used to find action in URI - pattern is REQUIRED (default: '/.*\/(.*)\.htm/')
			 * Ex: * /[action].htm
			 * NOTE: if modifying pattern, you must also modify '/.htaccess' file
			 *
			 * @var string core->router->uri_action_pattern
			 */
			'uri_action_pattern' => '/.*\/(.*)\.htm/',

			/**
			 * Pattern used to find controller in URI - pattern is REQUIRED (default: '/([^\/]+)\/(?!.*\/)/')
			 * Ex: * /[controller]/[action].htm, or /[module]/[controller]/[action].htm
			 * NOTE: if modifying pattern, you must also modify '/.htaccess' file
			 *
			 * @var string core->router->uri_controller_pattern
			 */
			'uri_controller_pattern' => '/([^\/]+)\/(?!.*\/)/',

			/**
			 * Pattern used to find module in URI - pattern is REQUIRED (defualt: '/(.*)\/.*\//')
			 * Ex: /[module]/[controller]/[action.htm]
			 * or multiple: /[module]/[sub-module]/[controller]/[action].htm
			 * NOTE: if modifying pattern, you must also modify '/.htaccess' file
			 *
			 * @var string core->router->uri_module_pattern
			 */
			'uri_module_pattern' => '/(.*)\/.*\//'
		)
	)
);
?>